import { Module } from '@nestjs/common';
import { ScheduleModule as NestScheduleModule } from '@nestjs/schedule';
import { TypeOrmModule } from '@nestjs/typeorm';
import { JobService } from './job.service';
import { JobController } from './job.controller';
import { SysJobEntity } from './entities/job.entity';
import { SysJobLogEntity } from './entities/job-log.entity';
import { TaskService } from './task.service';
import { JobLogService } from './job-log.service';
import { JobLogController } from './job-log.controller';
import { BackupService } from 'src/module/backup/backup.service';
import { SysOperlogEntity } from '../../monitor/operlog/entities/operlog.entity';
import { MonitorLoginlogEntity } from '../../monitor/loginlog/entities/loginlog.entity';

@Module({
  imports: [
    NestScheduleModule.forRoot(),
    TypeOrmModule.forFeature([
      SysJobEntity, 
      SysJobLogEntity,
      SysOperlogEntity,
      MonitorLoginlogEntity
    ]),
  ],
  controllers: [JobController, JobLogController],
  providers: [JobService, TaskService, JobLogService, BackupService],
  exports: [JobService],
})
export class JobModule {}
